package com.bookcode.dao;
import com.bookcode.entity.City;
import org.apache.ibatis.annotations.*;
import java.util.List;
@Mapper          // 标志为 Mybatis 的 Mapper
public interface CityDao {
    @Results({
            @Result(property = "id", column = "id"),
            @Result(property = "provinceId", column = "provinceId"),
            @Result(property = "cityName", column = "cityName"),
            @Result(property = "description", column = "description"),
    })
    @Select("SELECT * FROM city WHERE cityName = #{cityName}")
    List<City> findByName(String cityName);
}
